//
//  CommomTool.m
//  OrderDish
//
//  Created by mac on 16/11/25.
//  Copyright © 2016年 LiWenqing. All rights reserved.
//

#import "CommomTool.h"
#define KEY_WINDOW [[[UIApplication sharedApplication] delegate] window]
@implementation CommomTool

+(void)transformWithViewController:(UIViewController *)viewController{
    
    KEY_WINDOW.rootViewController= viewController;
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.5];
    [UIView setAnimationTransition:5 forView:KEY_WINDOW cache:YES] ;
    [UIView commitAnimations];
}
+(void)flipCellWithCell:(UIView *)cell{
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.3];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:cell cache:YES];
    [UIView commitAnimations];
}
@end
